/*
 * PanelSwapper.java
 *
 * Created on October 10, 2007, 5:14 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package jia.tools;

import javax.swing.JPanel;

/**
 *
 * @author estell
 */
public class PanelSwapper {
    
    /** Creates a new instance of PanelSwapper */
    public PanelSwapper() {
    }
    
    public static void swap(JPanel newPanel, JPanel containerPanel){
        newPanel.setVisible(true);
        containerPanel.getRootPane().getContentPane().setVisible(false);
        containerPanel.getRootPane().setContentPane(newPanel);  
        
        
    }
}
